package com.huc.design.behavior.strategy.base;

/**
 * @author huc
 * @version 1.0
 * @note 策略模式测试
 * @date 2021/10/7 14:49
 */
public class StrategyTest {
    public static void main(String[] args) {
        Context context;
        context = new Context(new ConcreteStrategyA());
        context.doAnything(); //我用算法A实现了
        context = new Context(new ConcreteStrategyB());
        context.doAnything(); // 我用算法B实现了
    }
}
